---
title: Web Tools
description: WebTools provides utilities for working with web URLs including URL expansion and web-related operations.
---

## Example

The following agent can work with web URLs and expand shortened links:

```python
from agno.agent import Agent
from agno.tools.webtools import WebTools

agent = Agent(
    instructions=[
        "You are a web utility assistant that helps with URL operations",
        "Expand shortened URLs to show their final destinations",
        "Help users understand where links lead before visiting them",
        "Provide clear information about URL expansions and redirects",
    ],
    tools=[WebTools()],
)

agent.print_response("Expand this shortened URL: https://bit.ly/3example", stream=True)
```

## Toolkit Params

| Parameter         | Type    | Default | Description                                                    |
| ----------------- | ------- | ------- | -------------------------------------------------------------- |
| `retries`         | `int`   | `3`     | Number of retry attempts for URL operations.                  |
| `enable_expand_url` | `bool` | `True`  | Enable URL expansion functionality.                           |

## Toolkit Functions

| Function     | Description                                                      |
| ------------ | ---------------------------------------------------------------- |
| `expand_url` | Expand shortened URLs to their final destination.               |


## Developer Resources

- View [Tools Source](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/webtools.py)
- [HTTPX Documentation](https://www.python-httpx.org/)
- [URL Standards](https://tools.ietf.org/html/rfc3986)
